<script lang="ts">


  export default{

      data(){
        return {
          msg: 'hello vue3 ',
          counter:1
        }
      },
      methods:{
          numPlus(){
           
            
       
            console.log("counter 的值是  ",this.counter)
            
            console.log(
              '%c this.counter: ',
              'background-color: #3756d4; padding: 4px 8px; border-radius: 2px; font-size: 14px; color: #fff; font-weight: 700;',
              this.counter 
            )

           
            // this.counter = this.counter+1
            this.counter++
        
          }
      },
      // computed
      // watch





  }



</script>

<template>
 
    自定义的 一个  vue组件 {{ msg }}

    <button @click="numPlus">计数器 {{ counter }}</button>

</template>

<style scoped>

</style>
